In recent years, a case increases in which an electronic device, such as a digital camera, a printer, a cell phone, or a smartphone, has a wireless communication function and is connected to a wireless network for use. In particular, a case increases in which communication is made between devices by using a wireless local area network (LAN) as a wireless communication function.
To connect the electronic device to the wireless network, it is required to set at least one of various communication parameters, such as an encryption method, an encryption key, an authentication method, and an authentication key. As a technology to make setting of such a communication parameter easy, there is a technology disclosed in PTL 1.
In PTL 1, an electronic device displays a Quick Response code (QR code, registered trademark, this note will be omitted hereinafter) indicative of a communication parameter. A cell phone reads the QR code by capturing the image of the QR code, and sets the read communication parameter at an access point.
Also, there is a technology in which ability information and identification information on an electronic device are included in a QR code, and processing for determining a role whether to operate as a base station or to operate as a slave station is simplified in Wi-Fi Direct (registered trademark, this note will be omitted hereinafter) (see PTL 2).
As described in PTL 1 and PTL 2, by setting a communication parameter upon capturing of an image of code information such as a two-dimensional code that can code much information, troublesome input by a user can be reduced. If a communication parameter is set through three devices like PTL 1, the device that executes image capturing causes the other devices to connect with one another, and thereafter the own device may no longer need to communicate with the other devices. In this case, if the technology for determining the role whether the base station or the slave station of Wi-Fi Direct is used like PTL 2, a connection network may be unnecessarily constructed unless the role of the device being an intermediary that wirelessly connects the other devices with one another is properly defined.
For example, if a first device being an intermediary wirelessly connects a second device and a third device with one another, first, the first device is connected with the second device, and transmits information required for wireless connection between the second device and the third device, to the second device. In this case, if information on the third device is transmitted to the second device in a wireless network constructed by the first device serving as a base station, the first device is no longer required to communicate with the second device or the third device. Hence, since the first device does not make communication by itself, the first device is no longer required to keep the formed wireless network.
In this way, after the first device being the intermediary operates as the base station and transmits the information required for the wireless communication between the second and third devices to the second device, the first device is no longer required to keep the formed wireless network, and therefore the first device may possibly terminate the wireless network. When the first device being the intermediary terminates the wireless network, the second device or the third device is required to execute processing of newly forming a wireless network for communication between the second and third devices.